package com.lixp.exam.dao;

import com.lixp.exam.bean.StudentUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;


@Mapper
@Repository
public interface OtherMapper{

    @Select("SELECT MAX(s_cert_no) FROM (SELECT *  FROM tbl_student WHERE erid=#{erid}) a")
    String findMaxCardNoByErid(Integer erid);

    @Select("SELECT MIN(s_cert_no) FROM (SELECT *  FROM tbl_student WHERE erid=#{erid}) a")
    String findMinCardNoByErid(Integer erid);

    @Select("select * from tbl_student_user where s_card_no = #{sCardNo}")
    StudentUser findById(@Param("sCardNo")String sCardNo);
}
